import os

path1 = "C:/Users/何涛/Documents/Tencent Files/761387278\FileRecv/vin码正反标记5.20/vin/up"
path2 = 'C:/Users/何涛/Documents/Tencent Files/761387278\FileRecv/vin码正反标记5.20/vin/down'

f= open("train_data/cls/cls_gt_train.txt", "w")
listimg1 = os.listdir(path1)
listimg2 = os.listdir(path2)

for i in range(len(listimg2)):
    f.write("train"+"/"+listimg1[i]+"\t"+str(0)+"\n")
    f.write("train"+"/"+listimg2[i]+"\t"+str(180)+"\n")

